Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle® Database XML Java API Reference 10g Release 2 (10.2) B14293-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.soap.server.util
Class ServerUtils

`java.lang.Object
oracle.soap.server.util.ServerUtils`

public class ServerUtils
extends java.lang.Object

Some server-side utility methods.

Constructor Summary
`ServerUtils()`

Method Summary
`static SOAPFaultRouter` | `buildFaultRouter(java.lang.String[] listeners, java.lang.ClassLoader cl)` Create the fault router from the list of fault listeners.
`static void` | `checkSoapConfigRootElement(Element root)`
`static ConfigManager` | `createConfigManager(Element root, java.lang.String defaultClassname, java.lang.ClassLoader cl, javax.servlet.ServletContext context)` Create an instance of a specific configuration manager given the classname.
`static Handler` | `createHandler(java.lang.String classname, java.lang.ClassLoader cl)` Create an instance of a handler given the classname.
`static java.util.Properties` | `createHandlers(Element root, java.lang.ClassLoader cl)` Create the list of global handlers for the SOAP server engine.
`static Logger` | `createLogger(Element root, ContainerContext context, java.lang.ClassLoader cl)` Create the logger for the SOAP server engine, which is defined in the SOAP servlet XML configuration file.
`static java.lang.Object` | `createObject(java.lang.String classname, java.lang.ClassLoader classLoader, java.lang.StringBuffer errs)` Create a new instance of the given class using the given classLoader.
`static Provider` | `createProvider(java.lang.String classname, java.lang.ClassLoader cl)` Create an instance of a specific provider given the classname.
`static ProviderManager` | `createProviderManager(Element root, java.lang.ClassLoader cl, javax.servlet.ServletContext context)`
`static ServiceManager` | `createServiceManager(Element root, ProviderManager providerManager, java.lang.ClassLoader cl, javax.servlet.ServletContext context)`
`static java.lang.String[]` | `getErrorHandlers(Element root)` Get the ordered list of error handler names.
`static java.lang.String[]` | `getFaultListeners(Element root)` Create the list of fault listeners for the SOAP server engine.
`static boolean` | `getPathAuth(Element root)`
`static java.lang.String[]` | `getRequestHandlers(Element root)` Get the ordered list of request handler names.
`static java.lang.String[]` | `getResponseHandlers(Element root)` Get the ordered list of response handler names.
`static java.lang.String` | `getStackTrace(java.lang.Throwable t)`
`static boolean` | `isNull(java.lang.String s)` Determine if the given string is null or empty.
`static void` | `rethrow(java.lang.String faultCode, java.lang.Throwable t)` Rethrow the given exception as a SOAPException.
`static void` | `rethrow(java.lang.String faultCode, java.lang.Throwable t, java.lang.String msg)` Rethrow the given exception as a SOAPException.
`static void` | `rethrow(java.lang.Throwable t)` Rethrow the given exception as a server-side SOAPException.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ServerUtils

    public ServerUtils()

Method Detail

### createObject

    public static java.lang.Object createObject(java.lang.String classname,
                                                java.lang.ClassLoader classLoader,
                                                java.lang.StringBuffer errs)

  Create a new instance of the given class using the given classLoader.
  Parameters:
    `classname` - Name of class to instantiate with no-args constructor. Cannot be null
    `classLoader` - class loader that should be used for loading the class. If `null` then the default class loader is used.
    `errs` - Contains error if unable to instantiate the class.
  Returns:
    The instantiated object, or `null` in case of error and the error is in `errs`.

### createConfigManager

    public static ConfigManager createConfigManager(Element root,
                                                    java.lang.String defaultClassname,
                                                    java.lang.ClassLoader cl,
                                                    javax.servlet.ServletContext context)
                                             throws SOAPException

  Create an instance of a specific configuration manager given the classname.
  Parameters:
    `root` - The root element of the document the contains the configuration manager specification.
    `defaultClassname` - The class name of the default configuration manager (implements `oracle.soap.server.ConfigManager`).
    `cl` - The class loader to use.
    `context` - The servlet context.
  Returns:
    The newly created configuration manager instance.
  Throws:
    `SOAPException` - If unable to instantiate the class, or the class is not a ConfigManager.

### createProvider

    public static Provider createProvider(java.lang.String classname,
                                          java.lang.ClassLoader cl)
                                   throws SOAPException

  Create an instance of a specific provider given the classname.
  Parameters:
    `classname` - The name of the class that implements `oracle.soap.server.Provider`.
  Returns:
    The newly created provider instance.
  Throws:
    `SOAPException` - If unable to find the class, or the class is not a Provider.

### createHandler

    public static Handler createHandler(java.lang.String classname,
                                        java.lang.ClassLoader cl)
                                 throws SOAPException

  Create an instance of a handler given the classname.
  Parameters:
    `classname` - The name of the class that implements `oracle.soap.server.Handler`.
  Returns:
    The newly created handler instance, which is not initialized.
  Throws:
    `SOAPException` - If unable to find the class, or the class is not a Handler.

### createProviderManager

    public static ProviderManager createProviderManager(Element root,
                                                        java.lang.ClassLoader cl,
                                                        javax.servlet.ServletContext context)
                                                 throws SOAPException

  Throws:
    `SOAPException`

### checkSoapConfigRootElement

    public static void checkSoapConfigRootElement(Element root)

### getPathAuth

    public static boolean getPathAuth(Element root)

### createServiceManager

    public static ServiceManager createServiceManager(Element root,
                                                      ProviderManager providerManager,
                                                      java.lang.ClassLoader cl,
                                                      javax.servlet.ServletContext context)
                                               throws SOAPException

  Throws:
    `SOAPException`

### createLogger

    public static Logger createLogger(Element root,
                                      ContainerContext context,
                                      java.lang.ClassLoader cl)
                               throws SOAPException

  Create the logger for the SOAP server engine, which is defined in the SOAP servlet XML configuration file. If no logger is configured, return a default logger, which is the servlet logger. Parse the XML document to extract the logger configuration, create the class, and initialize it with the given options.
  Parameters:
    `root` - The root element of the document the represents the SOAP configuration information.
    `context` - The SOAP server context.
  Throws:
    `SOAPException` - If unable to initialize the logger.

### createHandlers

    public static java.util.Properties createHandlers(Element root,
                                                      java.lang.ClassLoader cl)
                                               throws SOAPException

  Create the list of global handlers for the SOAP server engine. This list includes all handlers defined in the given document, which represents the SOAP configuration file. The handlers will be instantiated and have their options set so that they are ready to init, but they will not be initialized. Note that the handler elements must be contained in an element named 'handlers'.
  Parameters:
    `root` - The root element of the document the represents the SOAP configuration information.
  Throws:
    `SOAPException` - If error parsing the handlers.

### getRequestHandlers

    public static java.lang.String[] getRequestHandlers(Element root)
                                                 throws SOAPException

  Get the ordered list of request handler names.
  Parameters:
    `root` - The root element of the document the represents the SOAP configuration information.
  Throws:
    `SOAPException` - If error parsing the request handlers list.

### getResponseHandlers

    public static java.lang.String[] getResponseHandlers(Element root)
                                                  throws SOAPException

  Get the ordered list of response handler names.
  Parameters:
    `root` - The root element of the document the represents the SOAP configuration information.
  Throws:
    `SOAPException` - If error parsing the response handlers list.

### getErrorHandlers

    public static java.lang.String[] getErrorHandlers(Element root)
                                               throws SOAPException

  Get the ordered list of error handler names.
  Parameters:
    `root` - The root element of the document the represents the SOAP configuration information.
  Throws:
    `SOAPException` - If error parsing the error handlers list.

### getFaultListeners

    public static java.lang.String[] getFaultListeners(Element root)
                                                throws SOAPException

  Create the list of fault listeners for the SOAP server engine. Parse the XML document to extract the fault listeners, and return the list.
  Parameters:
    `root` - The root element of the document the represents the SOAP configuration information.
  Throws:
    `SOAPException` - If error parsing the faultListeners.

### buildFaultRouter

    public static SOAPFaultRouter buildFaultRouter(java.lang.String[] listeners,
                                                   java.lang.ClassLoader cl)

  Create the fault router from the list of fault listeners.
  Parameters:
    `listeners` - The list of fault listeners.

### rethrow

    public static void rethrow(java.lang.String faultCode,
                               java.lang.Throwable t,
                               java.lang.String msg)
                        throws SOAPException

  Rethrow the given exception as a SOAPException.
  Parameters:
    `faultCode` - The fault code from org.apache.soap.Constants.FAULT_CODE_xxx.
    `t` - The throwable exception that must be rethrown as a org.apache.soap.SOAPException if it is not already.
    `msg` - The message for the new `SOAPException`, if the exception is not already a `SOAPException`.
  Throws:
    `SOAPException` - Always thrown by definition.

### rethrow

    public static void rethrow(java.lang.String faultCode,
                               java.lang.Throwable t)
                        throws SOAPException

  Rethrow the given exception as a SOAPException.
  Parameters:
    `faultCode` - The fault code from org.apache.soap.Constants.FAULT_CODE_xxx.
    `t` - The throwable exception that must be rethrown as a org.apache.soap.SOAPException if it is not already.
  Throws:
    `SOAPException` - Always thrown by definition.

### rethrow

    public static void rethrow(java.lang.Throwable t)
                        throws SOAPException

  Rethrow the given exception as a server-side SOAPException.
  Parameters:
    `t` - The throwable exception that must be rethrown as a org.apache.soap.SOAPException if it is not already.
  Throws:
    `SOAPException` - Always thrown by definition.

### getStackTrace

    public static java.lang.String getStackTrace(java.lang.Throwable t)

### isNull

    public static boolean isNull(java.lang.String s)

  Determine if the given string is null or empty.
  Parameters:
    `s` - The string to check.
  Returns:
    `true` if the string is null or empty, else `false`.

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle® Database XML Java API Reference 10g Release 2 (10.2) B14293-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003, 2005, Oracle. All rights reserved.